home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 35 / Amiga Format AFCD35 (Issue 119, Jan 1999).iso / -in_the_mag- / reader_requests / fredobbutils / bbsrc / newbootmsg.s < prev    next >
Text File  |  1998-11-06  |  2KB  |  112 lines

  1. *************** Bootblock spécial ********************
  2. * Afficher un nouveau message à la place de l'habituel
  3. * 'Copyright © 1985 Commodore-Amiga ..'
  4.  
  5. * Will NOT work under 2.0+
  6.  
  7.     incdir    asm:/Include/
  8.     include    equ.s
  9.     include    exec/types.i
  10. ;    include    graphics/text.i
  11. ;    include    graphics/gfx.i
  12. ;    include    graphics/rastport.i
  13.  
  14.     rsreset
  15. NewVector rs.l    1
  16. ;intbase    rs.l    1
  17. VARSIZE    rs.w    0
  18.  
  19. ;DBUG=0
  20.  
  21. Start:
  22.     dc.b    "DOS",0
  23.     dc.l    0,$370
  24. Main:
  25.     IFD    DBUG
  26.     move.l    4.w,a6
  27.     ENDC
  28.     movem.l    d0-a6,-(sp)
  29.     lea    -VARSIZE(sp),sp    ;on utilise la pile comme base des variables
  30.     move.l    sp,a5        ;VarBase en a5
  31.  
  32.     btst    #6,$bfe001
  33.     beq.s    fin
  34.  
  35.     move.l    #CodeSize,d0
  36.     moveq    #1,d1
  37.     jsr    AllocMem(a6)
  38.     move.l    d0,NewVector(a5)
  39.     beq.s    fin
  40.  
  41.     lea    gfxname(pc),a1
  42.     moveq    #0,d0
  43.     jsr    OpenLibrary(a6)
  44.     move.l    d0,d7
  45.     beq.s    fin
  46.     move.l    d0,a1
  47.     move    #Text,a0
  48. .v    move.l    NewVector(a5),d0
  49.     jsr    SetFunction(a6)
  50.     lea    OldVector(pc),a0
  51.     move.l    d0,(a0)
  52.  
  53.     lea    New.Print(pc),a0
  54.     move.l    NewVector(a5),a1
  55.     move    #CodeSize,d0
  56. .cop    move.b    (a0)+,(a1)+
  57.     dbf    d0,.cop
  58.  
  59.     move.l    d7,a1
  60.     jsr    CloseLibrary(a6)
  61. fin
  62.     lea    VARSIZE(sp),sp    ;restitue la pile
  63.     movem.l    (sp)+,d0-a6
  64.  
  65. Init:
  66.     IFND    DBUG
  67.     lea    expansion.name(pc),a1
  68.     moveq    #37,d0
  69.     jsr    -552(a6)
  70.     tst.l    d0
  71.     beq.b    .err
  72.     move.l    d0,a1
  73.     bset    #6,34(a1)
  74.     jsr    -414(a6)
  75. .err    lea    dos.name(pc),a1
  76.     jsr    -96(a6)
  77.     tst.l    d0
  78.     beq.b    .nodos
  79.     move.l    d0,a0
  80.     move.l    22(a0),a0
  81.     moveq    #0,d0
  82.     rts
  83. .nodos    moveq    #-1,d0
  84.     ENDC
  85.     rts
  86.  
  87. New.Print:
  88. * restore old Vector
  89.     movem.l    d0-a6,-(sp)
  90.     move    #Text,a0
  91.     move.l    OldVector(pc),d0
  92.     move.l    4.w,a6
  93.     jsr    SetFunction(a6)
  94.     movem.l    (sp)+,d0-a6
  95. * print new text
  96.     lea    new.txt(pc),a0
  97.  
  98. .jmp    dc.w    $4ef9    ;instruction jmp
  99. OldVector:dc.l    0
  100.  
  101. new.txt:dc.b "Copyright © 1985-96 Frédéric Bassaler, Inc.",$a
  102.  
  103. CodeSize=*-New.Print
  104.  
  105. ;intname        dc.b    'intuition.library',0
  106. gfxname        dc.b    'graphics.library',0
  107. dos.name    dc.b    'dos.library',0
  108. expansion.name    dc.b    'expansion.library',0
  109.  
  110. End:
  111.     dcb.b    512,0
  112.